package boot.spring.type.producer.contrller;

import boot.spring.po.Mail;
import boot.spring.service.impl.ProducerImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProducerContrller {

    @Autowired
    ProducerImpl producer;


    @PostMapping("/produce")
    public void produce(Mail mail) throws Exception{
        producer.sendMail("myqueue",mail);
    }


}
